package o;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Outline;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.FontMetrics;
import android.graphics.Paint.Style;
import android.graphics.PointF;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
import androidx.annotation.AnimatorRes;
import androidx.annotation.AttrRes;
import androidx.annotation.BoolRes;
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DimenRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Px;
import androidx.annotation.StyleRes;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import o.aqu.n;
import o.fv.d;

public class arl extends Drawable implements gf, Callback {
    private static final int[] ˊ = new int[]{16842910};
    private boolean ʹ;
    @Nullable
    private CharSequence ʻ;
    @Nullable
    private ColorStateList ʻॱ;
    @Nullable
    private CharSequence ʼ;
    @Nullable
    private Drawable ʼॱ;
    @Nullable
    private asg ʽ;
    @Nullable
    private aqz ʽॱ;
    @Nullable
    private aqz ʾ;
    private boolean ʿ;
    private boolean ˈ;
    private float ˉ;
    private float ˊˊ;
    private float ˊˋ;
    private boolean ˊॱ;
    private float ˊᐝ;
    @Nullable
    private ColorStateList ˋ;
    private float ˋˊ;
    private float ˋˋ;
    @Nullable
    private ColorStateList ˋॱ;
    private float ˋᐝ;
    private final TextPaint ˌ = new TextPaint(1);
    private float ˍ;
    @Nullable
    private ColorStateList ˎ;
    private final Context ˎˎ;
    @Nullable
    private final Paint ˎˏ;
    private float ˏ;
    private final Paint ˏˎ = new Paint(1);
    private final RectF ˏˏ = new RectF();
    private final d ˏॱ = new d(this) {
        final /* synthetic */ arl ˊ;

        {
            this.ˊ = r1;
        }

        public void ˎ(@NonNull Typeface typeface) {
            this.ˊ.ﾟ = true;
            this.ˊ.ˊ();
            this.ˊ.invalidateSelf();
        }

        public void ˋ(int i) {
        }
    };
    private final FontMetrics ˑ = new FontMetrics();
    @Nullable
    private Drawable ͺ;
    private final PointF ͺॱ = new PointF();
    @ColorInt
    private int ـ;
    private float ॱ;
    @ColorInt
    private int ॱʻ;
    @ColorInt
    private int ॱʼ;
    @ColorInt
    private int ॱʽ;
    private float ॱˊ;
    private float ॱˋ;
    @Nullable
    private CharSequence ॱˎ;
    private boolean ॱͺ;
    @Nullable
    private ColorStateList ॱॱ;
    private boolean ॱᐝ;
    private float ᐝ;
    private int ᐝˊ = 255;
    @Nullable
    private ColorFilter ᐝˋ;
    @Nullable
    private Drawable ᐝॱ;
    @Nullable
    private ColorStateList ᐝᐝ;
    @ColorInt
    private int ᐧ;
    @Nullable
    private PorterDuffColorFilter ᐨ;
    private int[] ᶥ;
    private boolean ㆍ;
    @Nullable
    private Mode ꓸ = Mode.SRC_IN;
    @Nullable
    private ColorStateList ꜞ;
    private WeakReference<c> ꜟ = new WeakReference(null);
    private int ꞌ;
    private TruncateAt ﹳ;
    private float ﾞ;
    private boolean ﾟ = true;

    public interface c {
        void ˋ();
    }

    public static arl ॱ(Context context, AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
        arl o_arl = new arl(context);
        o_arl.ॱ(attributeSet, i, i2);
        return o_arl;
    }

    private arl(Context context) {
        this.ˎˎ = context;
        this.ʼ = "";
        this.ˌ.density = context.getResources().getDisplayMetrics().density;
        this.ˎˏ = null;
        if (this.ˎˏ != null) {
            this.ˎˏ.setStyle(Style.STROKE);
        }
        setState(ˊ);
        ˏ(ˊ);
        this.ʹ = true;
    }

    private void ॱ(AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
        TypedArray ॱ = asa.ॱ(this.ˎˎ, attributeSet, n.ᐝᐝ, i, i2, new int[0]);
        ˏ(asi.ˊ(this.ˎˎ, ॱ, n.ﾞ));
        ˋ(ॱ.getDimension(n.ﾟ, 0.0f));
        ˊ(ॱ.getDimension(n.ʹ, 0.0f));
        ˋ(asi.ˊ(this.ˎˎ, ॱ, n.ꞌ));
        ˎ(ॱ.getDimension(n.ʼˋ, 0.0f));
        ॱ(asi.ˊ(this.ˎˎ, ॱ, n.ᶥ));
        ˋ(ॱ.getText(n.ꓸ));
        ˎ(asi.ˏ(this.ˎˎ, ॱ, n.ᐨ));
        switch (ॱ.getInt(n.ᐝˋ, 0)) {
            case 1:
                ˋ(TruncateAt.START);
                break;
            case 2:
                ˋ(TruncateAt.MIDDLE);
                break;
            case 3:
                ˋ(TruncateAt.END);
                break;
        }
        ˏ(ॱ.getBoolean(n.ʻˊ, false));
        if (!(attributeSet == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "chipIconEnabled") == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "chipIconVisible") != null)) {
            ˏ(ॱ.getBoolean(n.ʻᐝ, false));
        }
        ˏ(asi.ˎ(this.ˎˎ, ॱ, n.ʼˊ));
        ˊ(asi.ˊ(this.ˎˎ, ॱ, n.ʻˋ));
        ॱ(ॱ.getDimension(n.ʽˋ, 0.0f));
        ॱ(ॱ.getBoolean(n.ʾॱ, false));
        if (!(attributeSet == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "closeIconEnabled") == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "closeIconVisible") != null)) {
            ॱ(ॱ.getBoolean(n.ʽˊ, false));
        }
        ˋ(asi.ˎ(this.ˎˎ, ॱ, n.ʼᐝ));
        ˎ(asi.ˊ(this.ˎˎ, ॱ, n.ʽᐝ));
        ˏ(ॱ.getDimension(n.ˊʻ, 0.0f));
        ˊ(ॱ.getBoolean(n.ꜟ, false));
        ˋ(ॱ.getBoolean(n.ˊʼ, false));
        if (!(attributeSet == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "checkedIconEnabled") == null || attributeSet.getAttributeValue("http://schemas.android.com/apk/res-auto", "checkedIconVisible") != null)) {
            ˋ(ॱ.getBoolean(n.ˉॱ, false));
        }
        ˎ(asi.ˎ(this.ˎˎ, ॱ, n.ˈॱ));
        ˋ(aqz.ॱ(this.ˎˎ, ॱ, n.ﹳ));
        ˎ(aqz.ॱ(this.ˎˎ, ॱ, n.ꜞ));
        ᐝ(ॱ.getDimension(n.ʿॱ, 0.0f));
        ॱॱ(ॱ.getDimension(n.ˋʼ, 0.0f));
        ʼ(ॱ.getDimension(n.ˌॱ, 0.0f));
        ʻ(ॱ.getDimension(n.ˊʽ, 0.0f));
        ʽ(ॱ.getDimension(n.ˋʻ, 0.0f));
        ˏॱ(ॱ.getDimension(n.ˋʽ, 0.0f));
        ॱˊ(ॱ.getDimension(n.ˏͺ, 0.0f));
        ͺ(ॱ.getDimension(n.ͺˎ, 0.0f));
        ˉ(ॱ.getDimensionPixelSize(n.ㆍ, ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED));
        ॱ.recycle();
    }

    public void ˎ(boolean z) {
        if (this.ㆍ != z) {
            this.ㆍ = z;
            ˏˎ();
            onStateChange(getState());
        }
    }

    public void ˎ(@Nullable c cVar) {
        this.ꜟ = new WeakReference(cVar);
    }

    protected void ˊ() {
        c cVar = (c) this.ꜟ.get();
        if (cVar != null) {
            cVar.ˋ();
        }
    }

    public void ˎ(RectF rectF) {
        ॱ(getBounds(), rectF);
    }

    public int getIntrinsicWidth() {
        return Math.min(Math.round((((((this.ˊˋ + ˏ()) + this.ˋˊ) + ˋˋ()) + this.ˊˊ) + ˌ()) + this.ˋᐝ), this.ꞌ);
    }

    public int getIntrinsicHeight() {
        return (int) this.ˏ;
    }

    private boolean ˋˊ() {
        return this.ˊॱ && this.ͺ != null;
    }

    private boolean ˊˊ() {
        return this.ˈ && this.ʼॱ != null && this.ॱͺ;
    }

    private boolean ˉ() {
        return this.ॱᐝ && this.ᐝॱ != null;
    }

    private boolean ˎˎ() {
        return this.ˈ && this.ʼॱ != null && this.ʿ;
    }

    public float ˏ() {
        if (ˋˊ() || ˊˊ()) {
            return (this.ˊᐝ + this.ॱˊ) + this.ˉ;
        }
        return 0.0f;
    }

    private float ˋˋ() {
        if (!this.ﾟ) {
            return this.ﾞ;
        }
        this.ﾞ = ॱ(this.ʻ);
        this.ﾟ = false;
        return this.ﾞ;
    }

    private float ॱ(@Nullable CharSequence charSequence) {
        if (charSequence == null) {
            return 0.0f;
        }
        return this.ˌ.measureText(charSequence, 0, charSequence.length());
    }

    private float ˌ() {
        if (ˉ()) {
            return (this.ˍ + this.ॱˋ) + this.ˋˋ;
        }
        return 0.0f;
    }

    public void draw(@NonNull Canvas canvas) {
        Rect bounds = getBounds();
        if (!bounds.isEmpty() && getAlpha() != 0) {
            int i = 0;
            if (this.ᐝˊ < 255) {
                i = ark.ˋ(canvas, (float) bounds.left, (float) bounds.top, (float) bounds.right, (float) bounds.bottom, this.ᐝˊ);
            }
            ॱ(canvas, bounds);
            ˎ(canvas, bounds);
            ˊ(canvas, bounds);
            ˋ(canvas, bounds);
            ˏ(canvas, bounds);
            if (this.ʹ) {
                ʽ(canvas, bounds);
            }
            ʼ(canvas, bounds);
            ʻ(canvas, bounds);
            if (this.ᐝˊ < 255) {
                canvas.restoreToCount(i);
            }
        }
    }

    private void ॱ(@NonNull Canvas canvas, Rect rect) {
        this.ˏˎ.setColor(this.ـ);
        this.ˏˎ.setStyle(Style.FILL);
        this.ˏˎ.setColorFilter(ˍ());
        this.ˏˏ.set(rect);
        canvas.drawRoundRect(this.ˏˏ, this.ॱ, this.ॱ, this.ˏˎ);
    }

    private void ˎ(@NonNull Canvas canvas, Rect rect) {
        if (this.ᐝ > 0.0f) {
            this.ˏˎ.setColor(this.ॱʻ);
            this.ˏˎ.setStyle(Style.STROKE);
            this.ˏˎ.setColorFilter(ˍ());
            this.ˏˏ.set(((float) rect.left) + (this.ᐝ / 2.0f), ((float) rect.top) + (this.ᐝ / 2.0f), ((float) rect.right) - (this.ᐝ / 2.0f), ((float) rect.bottom) - (this.ᐝ / 2.0f));
            float f = this.ॱ - (this.ᐝ / 2.0f);
            canvas.drawRoundRect(this.ˏˏ, f, f, this.ˏˎ);
        }
    }

    private void ˊ(@NonNull Canvas canvas, Rect rect) {
        this.ˏˎ.setColor(this.ॱʼ);
        this.ˏˎ.setStyle(Style.FILL);
        this.ˏˏ.set(rect);
        canvas.drawRoundRect(this.ˏˏ, this.ॱ, this.ॱ, this.ˏˎ);
    }

    private void ˋ(@NonNull Canvas canvas, Rect rect) {
        if (ˋˊ()) {
            ˋ(rect, this.ˏˏ);
            float f = this.ˏˏ.left;
            float f2 = this.ˏˏ.top;
            canvas.translate(f, f2);
            this.ͺ.setBounds(0, 0, (int) this.ˏˏ.width(), (int) this.ˏˏ.height());
            this.ͺ.draw(canvas);
            canvas.translate(-f, -f2);
        }
    }

    private void ˏ(@NonNull Canvas canvas, Rect rect) {
        if (ˊˊ()) {
            ˋ(rect, this.ˏˏ);
            float f = this.ˏˏ.left;
            float f2 = this.ˏˏ.top;
            canvas.translate(f, f2);
            this.ʼॱ.setBounds(0, 0, (int) this.ˏˏ.width(), (int) this.ˏˏ.height());
            this.ʼॱ.draw(canvas);
            canvas.translate(-f, -f2);
        }
    }

    private void ʽ(@NonNull Canvas canvas, Rect rect) {
        if (this.ʻ != null) {
            int i;
            Align ॱ = ॱ(rect, this.ͺॱ);
            ˏ(rect, this.ˏˏ);
            if (this.ʽ != null) {
                this.ˌ.drawableState = getState();
                this.ʽ.ˎ(this.ˎˎ, this.ˌ, this.ˏॱ);
            }
            this.ˌ.setTextAlign(ॱ);
            int i2 = Math.round(ˋˋ()) > Math.round(this.ˏˏ.width()) ? 1 : 0;
            if (i2 != 0) {
                int save = canvas.save();
                canvas.clipRect(this.ˏˏ);
                i = save;
            } else {
                i = 0;
            }
            CharSequence charSequence = this.ʻ;
            if (!(i2 == 0 || this.ﹳ == null)) {
                charSequence = TextUtils.ellipsize(this.ʻ, this.ˌ, this.ˏˏ.width(), this.ﹳ);
            }
            canvas.drawText(charSequence, 0, charSequence.length(), this.ͺॱ.x, this.ͺॱ.y, this.ˌ);
            if (i2 != 0) {
                canvas.restoreToCount(i);
            }
        }
    }

    private void ʼ(@NonNull Canvas canvas, Rect rect) {
        if (ˉ()) {
            ˎ(rect, this.ˏˏ);
            float f = this.ˏˏ.left;
            float f2 = this.ˏˏ.top;
            canvas.translate(f, f2);
            this.ᐝॱ.setBounds(0, 0, (int) this.ˏˏ.width(), (int) this.ˏˏ.height());
            this.ᐝॱ.draw(canvas);
            canvas.translate(-f, -f2);
        }
    }

    private void ʻ(@NonNull Canvas canvas, Rect rect) {
        if (this.ˎˏ != null) {
            this.ˎˏ.setColor(fu.ˋ(-16777216, 127));
            canvas.drawRect(rect, this.ˎˏ);
            if (ˋˊ() || ˊˊ()) {
                ˋ(rect, this.ˏˏ);
                canvas.drawRect(this.ˏˏ, this.ˎˏ);
            }
            if (this.ʻ != null) {
                canvas.drawLine((float) rect.left, rect.exactCenterY(), (float) rect.right, rect.exactCenterY(), this.ˎˏ);
            }
            if (ˉ()) {
                ˎ(rect, this.ˏˏ);
                canvas.drawRect(this.ˏˏ, this.ˎˏ);
            }
            this.ˎˏ.setColor(fu.ˋ(-65536, 127));
            ˊ(rect, this.ˏˏ);
            canvas.drawRect(this.ˏˏ, this.ˎˏ);
            this.ˎˏ.setColor(fu.ˋ(-16711936, 127));
            ॱ(rect, this.ˏˏ);
            canvas.drawRect(this.ˏˏ, this.ˎˏ);
        }
    }

    private void ˋ(Rect rect, RectF rectF) {
        rectF.setEmpty();
        if (ˋˊ() || ˊˊ()) {
            float f = this.ˊˋ + this.ˊᐝ;
            if (gg.ᐝ(this) == 0) {
                rectF.left = f + ((float) rect.left);
                rectF.right = rectF.left + this.ॱˊ;
            } else {
                rectF.right = ((float) rect.right) - f;
                rectF.left = rectF.right - this.ॱˊ;
            }
            rectF.top = rect.exactCenterY() - (this.ॱˊ / 2.0f);
            rectF.bottom = rectF.top + this.ॱˊ;
        }
    }

    Align ॱ(Rect rect, PointF pointF) {
        pointF.set(0.0f, 0.0f);
        Align align = Align.LEFT;
        if (this.ʻ != null) {
            float ˏ = (this.ˊˋ + ˏ()) + this.ˋˊ;
            if (gg.ᐝ(this) == 0) {
                pointF.x = ˏ + ((float) rect.left);
                align = Align.LEFT;
            } else {
                pointF.x = ((float) rect.right) - ˏ;
                align = Align.RIGHT;
            }
            pointF.y = ((float) rect.centerY()) - ˋᐝ();
        }
        return align;
    }

    private float ˋᐝ() {
        this.ˌ.getFontMetrics(this.ˑ);
        return (this.ˑ.descent + this.ˑ.ascent) / 2.0f;
    }

    private void ˏ(Rect rect, RectF rectF) {
        rectF.setEmpty();
        if (this.ʻ != null) {
            float ˏ = (this.ˊˋ + ˏ()) + this.ˋˊ;
            float ˌ = (this.ˋᐝ + ˌ()) + this.ˊˊ;
            if (gg.ᐝ(this) == 0) {
                rectF.left = ˏ + ((float) rect.left);
                rectF.right = ((float) rect.right) - ˌ;
            } else {
                rectF.left = ˌ + ((float) rect.left);
                rectF.right = ((float) rect.right) - ˏ;
            }
            rectF.top = (float) rect.top;
            rectF.bottom = (float) rect.bottom;
        }
    }

    private void ˎ(Rect rect, RectF rectF) {
        rectF.setEmpty();
        if (ˉ()) {
            float f = this.ˋᐝ + this.ˋˋ;
            if (gg.ᐝ(this) == 0) {
                rectF.right = ((float) rect.right) - f;
                rectF.left = rectF.right - this.ॱˋ;
            } else {
                rectF.left = f + ((float) rect.left);
                rectF.right = rectF.left + this.ॱˋ;
            }
            rectF.top = rect.exactCenterY() - (this.ॱˋ / 2.0f);
            rectF.bottom = rectF.top + this.ॱˋ;
        }
    }

    private void ˊ(Rect rect, RectF rectF) {
        rectF.set(rect);
        if (ˉ()) {
            float f = (((this.ˋᐝ + this.ˋˋ) + this.ॱˋ) + this.ˍ) + this.ˊˊ;
            if (gg.ᐝ(this) == 0) {
                rectF.right = ((float) rect.right) - f;
            } else {
                rectF.left = f + ((float) rect.left);
            }
        }
    }

    private void ॱ(Rect rect, RectF rectF) {
        rectF.setEmpty();
        if (ˉ()) {
            float f = (((this.ˋᐝ + this.ˋˋ) + this.ॱˋ) + this.ˍ) + this.ˊˊ;
            if (gg.ᐝ(this) == 0) {
                rectF.right = (float) rect.right;
                rectF.left = rectF.right - f;
            } else {
                rectF.left = (float) rect.left;
                rectF.right = f + ((float) rect.left);
            }
            rectF.top = (float) rect.top;
            rectF.bottom = (float) rect.bottom;
        }
    }

    public boolean isStateful() {
        if (ॱॱ(this.ˎ) || ॱॱ(this.ˋ) || ((this.ㆍ && ॱॱ(this.ꜞ)) || ॱ(this.ʽ) || ˎˎ() || ॱ(this.ͺ) || ॱ(this.ʼॱ) || ॱॱ(this.ᐝᐝ))) {
            return true;
        }
        return false;
    }

    public boolean ˎ() {
        return ॱ(this.ᐝॱ);
    }

    public boolean ˏ(@NonNull int[] iArr) {
        if (!Arrays.equals(this.ᶥ, iArr)) {
            this.ᶥ = iArr;
            if (ˉ()) {
                return ॱ(getState(), iArr);
            }
        }
        return false;
    }

    @NonNull
    public int[] ˋ() {
        return this.ᶥ;
    }

    protected boolean onStateChange(int[] iArr) {
        return ॱ(iArr, ˋ());
    }

    private boolean ॱ(int[] iArr, int[] iArr2) {
        boolean z;
        int colorForState;
        int i = 0;
        boolean z2 = true;
        boolean onStateChange = super.onStateChange(iArr);
        int colorForState2 = this.ˎ != null ? this.ˎ.getColorForState(iArr, this.ـ) : 0;
        if (this.ـ != colorForState2) {
            this.ـ = colorForState2;
            z = true;
        } else {
            z = onStateChange;
        }
        if (this.ˋ != null) {
            colorForState = this.ˋ.getColorForState(iArr, this.ॱʻ);
        } else {
            colorForState = 0;
        }
        if (this.ॱʻ != colorForState) {
            this.ॱʻ = colorForState;
            z = true;
        }
        if (this.ꜞ != null) {
            colorForState = this.ꜞ.getColorForState(iArr, this.ॱʼ);
        } else {
            colorForState = 0;
        }
        if (this.ॱʼ != colorForState) {
            this.ॱʼ = colorForState;
            if (this.ㆍ) {
                z = true;
            }
        }
        colorForState = (this.ʽ == null || this.ʽ.ˏ == null) ? 0 : this.ʽ.ˏ.getColorForState(iArr, this.ॱʽ);
        if (this.ॱʽ != colorForState) {
            this.ॱʽ = colorForState;
            z = true;
        }
        if (ॱ(getState(), 16842912) && this.ʿ) {
            onStateChange = true;
        } else {
            onStateChange = false;
        }
        if (this.ॱͺ == onStateChange || this.ʼॱ == null) {
            onStateChange = z;
            colorForState2 = 0;
        } else {
            float ˏ = ˏ();
            this.ॱͺ = onStateChange;
            if (ˏ != ˏ()) {
                colorForState2 = 1;
                onStateChange = true;
            } else {
                colorForState2 = 0;
                onStateChange = true;
            }
        }
        if (this.ᐝᐝ != null) {
            i = this.ᐝᐝ.getColorForState(iArr, this.ᐧ);
        }
        if (this.ᐧ != i) {
            this.ᐧ = i;
            this.ᐨ = arp.ˏ(this, this.ᐝᐝ, this.ꓸ);
        } else {
            z2 = onStateChange;
        }
        if (ॱ(this.ͺ)) {
            z2 |= this.ͺ.setState(iArr);
        }
        if (ॱ(this.ʼॱ)) {
            z2 |= this.ʼॱ.setState(iArr);
        }
        if (ॱ(this.ᐝॱ)) {
            z2 |= this.ᐝॱ.setState(iArr2);
        }
        if (z2) {
            invalidateSelf();
        }
        if (colorForState2 != 0) {
            ˊ();
        }
        return z2;
    }

    private static boolean ॱॱ(@Nullable ColorStateList colorStateList) {
        return colorStateList != null && colorStateList.isStateful();
    }

    private static boolean ॱ(@Nullable Drawable drawable) {
        return drawable != null && drawable.isStateful();
    }

    private static boolean ॱ(@Nullable asg o_asg) {
        return (o_asg == null || o_asg.ˏ == null || !o_asg.ˏ.isStateful()) ? false : true;
    }

    @TargetApi(23)
    public boolean onLayoutDirectionChanged(int i) {
        int onLayoutDirectionChanged = super.onLayoutDirectionChanged(i);
        if (ˋˊ()) {
            onLayoutDirectionChanged |= this.ͺ.setLayoutDirection(i);
        }
        if (ˊˊ()) {
            onLayoutDirectionChanged |= this.ʼॱ.setLayoutDirection(i);
        }
        if (ˉ()) {
            onLayoutDirectionChanged |= this.ᐝॱ.setLayoutDirection(i);
        }
        if (onLayoutDirectionChanged != 0) {
            invalidateSelf();
        }
        return true;
    }

    protected boolean onLevelChange(int i) {
        boolean onLevelChange = super.onLevelChange(i);
        if (ˋˊ()) {
            onLevelChange |= this.ͺ.setLevel(i);
        }
        if (ˊˊ()) {
            onLevelChange |= this.ʼॱ.setLevel(i);
        }
        if (ˉ()) {
            onLevelChange |= this.ᐝॱ.setLevel(i);
        }
        if (onLevelChange) {
            invalidateSelf();
        }
        return onLevelChange;
    }

    public boolean setVisible(boolean z, boolean z2) {
        boolean visible = super.setVisible(z, z2);
        if (ˋˊ()) {
            visible |= this.ͺ.setVisible(z, z2);
        }
        if (ˊˊ()) {
            visible |= this.ʼॱ.setVisible(z, z2);
        }
        if (ˉ()) {
            visible |= this.ᐝॱ.setVisible(z, z2);
        }
        if (visible) {
            invalidateSelf();
        }
        return visible;
    }

    public void setAlpha(int i) {
        if (this.ᐝˊ != i) {
            this.ᐝˊ = i;
            invalidateSelf();
        }
    }

    public int getAlpha() {
        return this.ᐝˊ;
    }

    public void setColorFilter(@Nullable ColorFilter colorFilter) {
        if (this.ᐝˋ != colorFilter) {
            this.ᐝˋ = colorFilter;
            invalidateSelf();
        }
    }

    @Nullable
    public ColorFilter getColorFilter() {
        return this.ᐝˋ;
    }

    public void setTintList(@Nullable ColorStateList colorStateList) {
        if (this.ᐝᐝ != colorStateList) {
            this.ᐝᐝ = colorStateList;
            onStateChange(getState());
        }
    }

    public void setTintMode(@NonNull Mode mode) {
        if (this.ꓸ != mode) {
            this.ꓸ = mode;
            this.ᐨ = arp.ˏ(this, this.ᐝᐝ, mode);
            invalidateSelf();
        }
    }

    public int getOpacity() {
        return -3;
    }

    @TargetApi(21)
    public void getOutline(@NonNull Outline outline) {
        Rect bounds = getBounds();
        if (bounds.isEmpty()) {
            outline.setRoundRect(0, 0, getIntrinsicWidth(), getIntrinsicHeight(), this.ॱ);
        } else {
            outline.setRoundRect(bounds, this.ॱ);
        }
        outline.setAlpha(((float) getAlpha()) / 255.0f);
    }

    public void invalidateDrawable(@NonNull Drawable drawable) {
        Callback callback = getCallback();
        if (callback != null) {
            callback.invalidateDrawable(this);
        }
    }

    public void scheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable, long j) {
        Callback callback = getCallback();
        if (callback != null) {
            callback.scheduleDrawable(this, runnable, j);
        }
    }

    public void unscheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable) {
        Callback callback = getCallback();
        if (callback != null) {
            callback.unscheduleDrawable(this, runnable);
        }
    }

    private void ˊ(@Nullable Drawable drawable) {
        if (drawable != null) {
            drawable.setCallback(null);
        }
    }

    private void ᐝ(@Nullable Drawable drawable) {
        if (drawable != null) {
            drawable.setCallback(this);
            gg.ˏ(drawable, gg.ᐝ(this));
            drawable.setLevel(getLevel());
            drawable.setVisible(isVisible(), false);
            if (drawable == this.ᐝॱ) {
                if (drawable.isStateful()) {
                    drawable.setState(ˋ());
                }
                gg.ॱ(drawable, this.ʻॱ);
            } else if (drawable.isStateful()) {
                drawable.setState(getState());
            }
        }
    }

    @Nullable
    private ColorFilter ˍ() {
        return this.ᐝˋ != null ? this.ᐝˋ : this.ᐨ;
    }

    private void ˏˎ() {
        this.ꜞ = this.ㆍ ? asl.ˎ(this.ॱॱ) : null;
    }

    private static boolean ॱ(@Nullable int[] iArr, @AttrRes int i) {
        if (iArr == null) {
            return false;
        }
        for (int i2 : iArr) {
            if (i2 == i) {
                return true;
            }
        }
        return false;
    }

    public void ˊ(@ColorRes int i) {
        ˏ(ar.ˊ(this.ˎˎ, i));
    }

    public void ˏ(@Nullable ColorStateList colorStateList) {
        if (this.ˎ != colorStateList) {
            this.ˎ = colorStateList;
            onStateChange(getState());
        }
    }

    public void ˎ(@DimenRes int i) {
        ˋ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ˋ(float f) {
        if (this.ˏ != f) {
            this.ˏ = f;
            invalidateSelf();
            ˊ();
        }
    }

    public void ˏ(@DimenRes int i) {
        ˊ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ˊ(float f) {
        if (this.ॱ != f) {
            this.ॱ = f;
            invalidateSelf();
        }
    }

    public void ॱ(@ColorRes int i) {
        ˋ(ar.ˊ(this.ˎˎ, i));
    }

    public void ˋ(@Nullable ColorStateList colorStateList) {
        if (this.ˋ != colorStateList) {
            this.ˋ = colorStateList;
            onStateChange(getState());
        }
    }

    public void ˋ(@DimenRes int i) {
        ˎ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ˎ(float f) {
        if (this.ᐝ != f) {
            this.ᐝ = f;
            this.ˏˎ.setStrokeWidth(f);
            invalidateSelf();
        }
    }

    @Nullable
    public ColorStateList ॱ() {
        return this.ॱॱ;
    }

    public void ʽ(@ColorRes int i) {
        ॱ(ar.ˊ(this.ˎˎ, i));
    }

    public void ॱ(@Nullable ColorStateList colorStateList) {
        if (this.ॱॱ != colorStateList) {
            this.ॱॱ = colorStateList;
            ˏˎ();
            onStateChange(getState());
        }
    }

    @NonNull
    public CharSequence ʽ() {
        return this.ʼ;
    }

    public void ˋ(@Nullable CharSequence charSequence) {
        if (charSequence == null) {
            charSequence = "";
        }
        if (this.ʼ != charSequence) {
            this.ʼ = charSequence;
            this.ʻ = gu.ˏ().ˋ(charSequence);
            this.ﾟ = true;
            invalidateSelf();
            ˊ();
        }
    }

    @Nullable
    public asg ʼ() {
        return this.ʽ;
    }

    public void ʻ(@StyleRes int i) {
        ˎ(new asg(this.ˎˎ, i));
    }

    public void ˎ(@Nullable asg o_asg) {
        if (this.ʽ != o_asg) {
            this.ʽ = o_asg;
            if (o_asg != null) {
                o_asg.ˊ(this.ˎˎ, this.ˌ, this.ˏॱ);
                this.ﾟ = true;
            }
            onStateChange(getState());
            ˊ();
        }
    }

    public TruncateAt ʻ() {
        return this.ﹳ;
    }

    public void ˋ(@Nullable TruncateAt truncateAt) {
        this.ﹳ = truncateAt;
    }

    public boolean ᐝ() {
        return this.ˊॱ;
    }

    public void ॱॱ(@BoolRes int i) {
        ˏ(this.ˎˎ.getResources().getBoolean(i));
    }

    public void ˏ(boolean z) {
        if (this.ˊॱ != z) {
            boolean ˋˊ = ˋˊ();
            this.ˊॱ = z;
            boolean ˋˊ2 = ˋˊ();
            if ((ˋˊ != ˋˊ2 ? 1 : null) != null) {
                if (ˋˊ2) {
                    ᐝ(this.ͺ);
                } else {
                    ˊ(this.ͺ);
                }
                invalidateSelf();
                ˊ();
            }
        }
    }

    @Nullable
    public Drawable ॱॱ() {
        return this.ͺ != null ? gg.ॱॱ(this.ͺ) : null;
    }

    public void ᐝ(@DrawableRes int i) {
        ˏ(ar.ˋ(this.ˎˎ, i));
    }

    public void ˏ(@Nullable Drawable drawable) {
        Drawable ॱॱ = ॱॱ();
        if (ॱॱ != drawable) {
            float ˏ = ˏ();
            this.ͺ = drawable != null ? gg.ʻ(drawable).mutate() : null;
            float ˏ2 = ˏ();
            ˊ(ॱॱ);
            if (ˋˊ()) {
                ᐝ(this.ͺ);
            }
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public void ʼ(@ColorRes int i) {
        ˊ(ar.ˊ(this.ˎˎ, i));
    }

    public void ˊ(@Nullable ColorStateList colorStateList) {
        if (this.ˋॱ != colorStateList) {
            this.ˋॱ = colorStateList;
            if (ˋˊ()) {
                gg.ॱ(this.ͺ, colorStateList);
            }
            onStateChange(getState());
        }
    }

    public float ˏॱ() {
        return this.ॱˊ;
    }

    public void ˋॱ(@DimenRes int i) {
        ॱ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ॱ(float f) {
        if (this.ॱˊ != f) {
            float ˏ = ˏ();
            this.ॱˊ = f;
            float ˏ2 = ˏ();
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public boolean ͺ() {
        return this.ॱᐝ;
    }

    public void ॱˊ(@BoolRes int i) {
        ॱ(this.ˎˎ.getResources().getBoolean(i));
    }

    public void ॱ(boolean z) {
        if (this.ॱᐝ != z) {
            boolean ˉ = ˉ();
            this.ॱᐝ = z;
            boolean ˉ2 = ˉ();
            if ((ˉ != ˉ2 ? 1 : null) != null) {
                if (ˉ2) {
                    ᐝ(this.ᐝॱ);
                } else {
                    ˊ(this.ᐝॱ);
                }
                invalidateSelf();
                ˊ();
            }
        }
    }

    @Nullable
    public Drawable ॱˊ() {
        return this.ᐝॱ != null ? gg.ॱॱ(this.ᐝॱ) : null;
    }

    public void ˏॱ(@DrawableRes int i) {
        ˋ(ar.ˋ(this.ˎˎ, i));
    }

    public void ˋ(@Nullable Drawable drawable) {
        Drawable ॱˊ = ॱˊ();
        if (ॱˊ != drawable) {
            float ˌ = ˌ();
            this.ᐝॱ = drawable != null ? gg.ʻ(drawable).mutate() : null;
            float ˌ2 = ˌ();
            ˊ(ॱˊ);
            if (ˉ()) {
                ᐝ(this.ᐝॱ);
            }
            invalidateSelf();
            if (ˌ != ˌ2) {
                ˊ();
            }
        }
    }

    public void ˊॱ(@ColorRes int i) {
        ˎ(ar.ˊ(this.ˎˎ, i));
    }

    public void ˎ(@Nullable ColorStateList colorStateList) {
        if (this.ʻॱ != colorStateList) {
            this.ʻॱ = colorStateList;
            if (ˉ()) {
                gg.ॱ(this.ᐝॱ, colorStateList);
            }
            onStateChange(getState());
        }
    }

    public float ˋॱ() {
        return this.ॱˋ;
    }

    public void ͺ(@DimenRes int i) {
        ˏ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ˏ(float f) {
        if (this.ॱˋ != f) {
            this.ॱˋ = f;
            invalidateSelf();
            if (ˉ()) {
                ˊ();
            }
        }
    }

    public void ˎ(@Nullable CharSequence charSequence) {
        if (this.ॱˎ != charSequence) {
            this.ॱˎ = gu.ˏ().ˋ(charSequence);
            invalidateSelf();
        }
    }

    @Nullable
    public CharSequence ˊॱ() {
        return this.ॱˎ;
    }

    public boolean ॱᐝ() {
        return this.ʿ;
    }

    public void ॱᐝ(@BoolRes int i) {
        ˊ(this.ˎˎ.getResources().getBoolean(i));
    }

    public void ˊ(boolean z) {
        if (this.ʿ != z) {
            this.ʿ = z;
            float ˏ = ˏ();
            if (!z && this.ॱͺ) {
                this.ॱͺ = false;
            }
            float ˏ2 = ˏ();
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public boolean ॱˎ() {
        return this.ˈ;
    }

    public void ॱˋ(@BoolRes int i) {
        ˋ(this.ˎˎ.getResources().getBoolean(i));
    }

    public void ˋ(boolean z) {
        if (this.ˈ != z) {
            boolean ˊˊ = ˊˊ();
            this.ˈ = z;
            boolean ˊˊ2 = ˊˊ();
            if ((ˊˊ != ˊˊ2 ? 1 : null) != null) {
                if (ˊˊ2) {
                    ᐝ(this.ʼॱ);
                } else {
                    ˊ(this.ʼॱ);
                }
                invalidateSelf();
                ˊ();
            }
        }
    }

    @Nullable
    public Drawable ʻॱ() {
        return this.ʼॱ;
    }

    public void ʻॱ(@DrawableRes int i) {
        ˎ(ar.ˋ(this.ˎˎ, i));
    }

    public void ˎ(@Nullable Drawable drawable) {
        if (this.ʼॱ != drawable) {
            float ˏ = ˏ();
            this.ʼॱ = drawable;
            float ˏ2 = ˏ();
            ˊ(this.ʼॱ);
            ᐝ(this.ʼॱ);
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public void ॱˎ(@AnimatorRes int i) {
        ˋ(aqz.ˏ(this.ˎˎ, i));
    }

    public void ˋ(@Nullable aqz o_aqz) {
        this.ʽॱ = o_aqz;
    }

    public void ᐝॱ(@AnimatorRes int i) {
        ˎ(aqz.ˏ(this.ˎˎ, i));
    }

    public void ˎ(@Nullable aqz o_aqz) {
        this.ʾ = o_aqz;
    }

    public float ॱˋ() {
        return this.ˊˋ;
    }

    public void ʽॱ(@DimenRes int i) {
        ᐝ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ᐝ(float f) {
        if (this.ˊˋ != f) {
            this.ˊˋ = f;
            invalidateSelf();
            ˊ();
        }
    }

    public float ᐝॱ() {
        return this.ˊᐝ;
    }

    public void ˈ(@DimenRes int i) {
        ॱॱ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ॱॱ(float f) {
        if (this.ˊᐝ != f) {
            float ˏ = ˏ();
            this.ˊᐝ = f;
            float ˏ2 = ˏ();
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public float ʾ() {
        return this.ˉ;
    }

    public void ʿ(@DimenRes int i) {
        ʼ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ʼ(float f) {
        if (this.ˉ != f) {
            float ˏ = ˏ();
            this.ˉ = f;
            float ˏ2 = ˏ();
            invalidateSelf();
            if (ˏ != ˏ2) {
                ˊ();
            }
        }
    }

    public float ˈ() {
        return this.ˋˊ;
    }

    public void ʾ(@DimenRes int i) {
        ʻ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ʻ(float f) {
        if (this.ˋˊ != f) {
            this.ˋˊ = f;
            invalidateSelf();
            ˊ();
        }
    }

    public float ʼॱ() {
        return this.ˊˊ;
    }

    public void ʼॱ(@DimenRes int i) {
        ʽ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ʽ(float f) {
        if (this.ˊˊ != f) {
            this.ˊˊ = f;
            invalidateSelf();
            ˊ();
        }
    }

    public float ʿ() {
        return this.ˍ;
    }

    public void ˋˊ(@DimenRes int i) {
        ˏॱ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ˏॱ(float f) {
        if (this.ˍ != f) {
            this.ˍ = f;
            invalidateSelf();
            if (ˉ()) {
                ˊ();
            }
        }
    }

    public float ʽॱ() {
        return this.ˋˋ;
    }

    public void ˊᐝ(@DimenRes int i) {
        ॱˊ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ॱˊ(float f) {
        if (this.ˋˋ != f) {
            this.ˋˋ = f;
            invalidateSelf();
            if (ˉ()) {
                ˊ();
            }
        }
    }

    public float ˊˋ() {
        return this.ˋᐝ;
    }

    public void ˊˊ(@DimenRes int i) {
        ͺ(this.ˎˎ.getResources().getDimension(i));
    }

    public void ͺ(float f) {
        if (this.ˋᐝ != f) {
            this.ˋᐝ = f;
            invalidateSelf();
            ˊ();
        }
    }

    public void ˉ(@Px int i) {
        this.ꞌ = i;
    }

    public boolean ˊᐝ() {
        return this.ʹ;
    }

    public void ॱॱ(boolean z) {
        this.ʹ = z;
    }
}
